﻿@model IEnumerable<SearchViewModel>;

@{
    ViewData["Title"] = "查询结果";
}

@section Header {
    <title>@ViewData["Title"] - 搜索结果 - owllook</title>
    <link rel="stylesheet" href="~/novels/css/result.css">
    <style>
        @@media (min-width: 1680px) {
            .container {
                margin-left: 3% !important;
            }
        }
    </style>
}

@await Html.PartialAsync("_SearchBarPartial")
<div class="container">
    <div class="result row">
        <div class="show-result col-sm-7 col-xs-12">
            <p style="color: #868383;font-size: 13px; ">找到 @Model.Count() 条结果</p>
            <div class="list-unstyled item">
                @foreach (var item in Model)
                {
                    <div class="result_item col-sm-9 col-xs-12">
                        <ul>
                            <li>
                                @{
                                    var parms = new Dictionary<string, string>{
                                            { "url", item.Url },
                                            { "novels_name", Context.Request.Query["wd"] }
};
                                }
                                <a target="_blank" asp-controller="Home" asp-action="Chapter" asp-all-route-data="parms">@item.Title</a>
                                <div class="netloc">
                                    <i>@item.Host</i>
                                    <i><a target="_blank" href="@item.Url">查看源网址</a></i>
                                </div>
                                <div class="tags">
                                    <span>@item.Time</span>
                                    @if (item.IsRecommend)
                                    {
                                        <span class="label label-primary">推荐源</span>
                                    }
                                    @if (item.IsParse)
                                    {
                                        <span class="label label-primary parse-label">已解析</span>
                                    }
                                    else
                                    {
                                        <span class="label label-danger parse-label">未解析</span>
                                    }
                                </div>
                            </li>
                        </ul>
                    </div>

                }
            </div>
            <div class="move">
                <div class="move_up">
                    <span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span>
                </div>
                <div class="move_down">
                    <span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
                </div>
            </div>
        </div>
    </div>
</div>
